define(["../../component/rate/avalon.rate","../../component/tooltip/avalon.tooltip","../../component/tags/avalon.tags","../../component/draggable/avalon.draggable","../../component/progressbar/avalon.progressbar","../../component/slider/avalon.slider","../../component/switch/avalon.switch","../../component/tree/avalon.newTree","../../component/doublelist/avalon.doublelist","../../component/fileuploader/avalon.fileuploader","../../component/smartdatepicker/avalon.smartdatepicker"], function(){
    var toolsv = avalon.define({
        $id:"toolsDetail",
        switchval:false,
        $switchconfig1:{
            onchangeStatus:function(_v){
                toolsv.switchval = _v;
            }
        },
        rt:2,
        $rateconfig:{
            half:true,
            aferClick:function(vl){
                toolsv.rt = vl;
            }
        },
        $tagsconfig1:{
            closeshow:false,
            data:[{name:'警告',value:'1'}]
        },
        $tpconfig2:{
            fromtarget:'s2',
            color:'#000',
            backgroundcolor:'red',
            content:'tooltip组件的警告red'
        },
        $tpconfig3:{
            fromtarget:'s3',
            color:'blue',
            backgroundcolor:'orange',
            content:'tooltip组件的警告yellow'
        },
        $tagsconfig:{
            data:[{name:'name1',value:'1'},{name:'name2',value:'2'},{name:'name3',value:'3'},{name:'name4',value:'4'},{name:'name4',value:'4'}],
            fontcolor:"#fff",
            //closeshow:false,
            tagswidth:"270px",
            bgcolor:"#F1A84A"
        },
        $progressconfig1:{
            simulate:50,
            label:false,
            indeterminate:false,
            completestr:"完成"
        },
        progressreset:function () {
            avalon.vmodels.progressbar1.reset();
        },
        slidervalue:20,
        sliderpercent:30,
        $sliderconfig1:{
            $valueMin:'0',
            $valueMax:'50',
            value:'20',
            onDrag:function (o,data) {
                toolsv.slidervalue = o.value;
                toolsv.sliderpercent = o.percent;
            }
        },
        $treeconfig1:{
            url:'../../component/tree/xx.json',
            checkbox:true,
            checkboxType:{click:"c"},
            onClicked:function(){
                alert('tree');
            }
        },
        $doublelistconfig1:{
            data: [
                {name: "北京", value: 1},
                {name: "上海", value: 2},
                {name: "广州", value: 3},
                {name: "天津", value: 4},
                {name: "重庆", value: 5}
            ]
        },
        $smartdatepickerconfig1:{

        },
        $fileuploaderconfig1:{
            addButtonText: "添加文件",
            uploadButtonText: "开始上传",
            acceptFileTypes: "image.*,*.txt,*.js",
            onFileOverSize: function (fileObj) {
                alert(fileObj.name+"超出了文件尺寸限制")
            },
            onFilePoolOverSize: function (fileObj, poolSize) {
                alert("文件缓存池达已满，不能继续添加文件。")
            },
            onSameFileAdded: function () {
                alert("不能添加相同的文件");
            },

            enableDragDrop: true,
            enableRemoteKeyGen: false,
            chunked: true,
            chunkSize: 1024*1024
        }
    });
    return toolsv;
});